package com.zbkj.dal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zbkj.dal.entity.user.EmployeeAccount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author JinXinyu
 * @date 2024-03-20 22:02:34
 */
@Mapper
public interface EmployeeAccountDao extends BaseMapper<EmployeeAccount> {

    @Update("update eb_employee_account a set a.employee_no = #{newEmployeeNo}, a.update_time = current_timestamp where a.employee_no = #{oldEmployeeNo}")
    void updateEmployeeNo(@Param("oldEmployeeNo") String oldEmployeeNo, @RequestParam("Param") String newEmployeeNo);

}
